﻿@model OrchardHUN.Scripting.Models.ScriptPart

@using (Script.Foot())
{
    <script type="text/javascript">
        (function ($) {
            $(document).on("selectedEngineChanged.ScriptingExtensions", function (values) {
                if (values.engine != "JS") return;

                values.editor.getSession().setMode("ace/mode/javascript");
                values.help.sample.getSession().setMode("ace/mode/javascript");

                values.help.hint.text("@T("You can use normal JavaScript here. The last statement will be the output of the script.")");
                values.help.sample.getSession().setValue("var hello = \"Hello JavaScript!\"; \r\nhello;");
            });
        })(jQuery);
    </script>
}